package sieve

import (
	"github.com/google/wire"
	"sieve_admin_server/app/api/util"
	"sieve_admin_server/app/server"
	serviceSieve "sieve_admin_server/app/service/sieve"
)

var _ util.API = (*EngineSettingsAPI)(nil)

var EngineSettingsSet = wire.NewSet(wire.Struct(new(EngineSettingsAPI), "*"))

type EngineSettingsAPI struct {
	util.EmptyAPI

	SieveEngineSrv *serviceSieve.SieveEngineSrv
}

func (a *EngineSettingsAPI) GetApis() []*server.BatchModTree {
	return []*server.BatchModTree{
		{
			Obj:   a,
			Name:  "engineSettings",
			Title: "引擎参数设定", Perms: []*server.Perm{
				{Name: "query", Title: "查询"},
				{Name: "add", Title: "新增"},
				{Name: "download", Title: "下载"},
				{Name: "op", Title: "引擎操作"},
			},
			Order: 5,
		},
	}
}
